﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight.Messaging;

namespace SimpleChat
{
    public class WindowDialogMessage<T> : MessageBase
    {
        private Action<T> callback;
        public string WindowName { get; set; }

        public WindowDialogMessage(string name, Action<T> callback)
            : base()
        {
            this.callback = callback;
            this.WindowName = name;
        }

        public void ProcessCallback(T obj)
        {
            if (callback != null)
                callback.Invoke(obj);
        }
    }
}
